<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/lotoweb-tags" prefix="t"%>
<link type="text/css" href="../res/css/thickbox.css" rel="stylesheet" />

<script type="text/javascript" src="../res/js/thickbox.js"></script>

<script type="text/javascript">
	$(function() {
		$("tbody tr").click(function() {
			OnSelect($(this));
		});
	});
</script>

<div id="wrapper">
	<div class="content">
		<div class="infowrap">
			<div class="infobox">
				<h3>
					<span><s:text name="project.page.querytitle" /></span>
				</h3>
				<form action="userList.do" method="post">
					<p class="youhave">
						<s:text name="manage.userlist.query.username" />
						<s:textfield name="username" id="username" cols="10" />
						&nbsp;&nbsp;
						<s:submit name="btnQuery" key="project.page.query" />
						&nbsp;&nbsp;
						<s:actionmessage />
					</p>
				</form>
			</div>
		</div>
		<div class="infowrap">
			<div class="normalbox">
				<s:text name="manage.userlist.title" />
				<table>
					<thead>
						<tr>
							<th><s:text name="manage.userlist.table.username" /></th>
							<th><s:text name="manage.userlist.table.dept" /></th>
							<th><s:text name="manage.userlist.table.lastlogin" /></th>
							<th><s:text name="manage.userlist.table.enabled" /></th>
							<th><s:text name="manage.userlist.table.operation" /></th>
						</tr>
					</thead>
					<tbody>
						<s:iterator value="userList" id="userList" status="u">
							<tr>
								<td><s:property value="userName" /></td>
								<td><s:property value="userWorkPart" /></td>
								<td><s:text name="format.datetime">
										<s:param value="userLastActiveOn" />
									</s:text></td>
								<td><s:set name="lockSid" value="userLockSid" /> <s:if
										test="%{#lockSid==1}">
										<s:text name="dict.enabled.false" />
									</s:if> <s:else>
										<s:text name="dict.enabled.true" />
									</s:else></td>
								<td><a
									href="userAccess.do?id=<s:property
										value="userName" />&keepThis=true&amp;TB_iframe=true&amp;height=650&amp;width=400"
									title="<s:text name="manage.userlist.alt.edit" /><s:property
										value="userName" /><s:text name="manage.userlist.alt.right" />"
									class="thickbox"><s:text name="manage.userlist.oper.edit" /></a></td>
							</tr>
						</s:iterator>
					</tbody>
				</table>

			</div>
			<div class="cpager">
				<s:set value="result.pager.totalRow" var="totalRow"></s:set>
				<s:set value="page" var="currentPage"></s:set>
				<s:set value="PAGE_SIZE" var="pageSize"></s:set>
				<s:set value="pagerUrl" var="url"></s:set>
				<t:pager pageSize="${pageSize}" url="${url}"
					currentPage="${currentPage}" totalRow="${totalRow}"></t:pager>
			</div>

		</div>
	</div>
</div>